<?php $cycle = $this->cycle(array("even", "odd")); ?>
<?php if (count($this->entries)): ?>
<table class="zs-entity-list <?php echo 'zs-' . $this->entityTitle ?>" cellspacing="0" cellpadding="0" border="0">
    <thead>
        <tr>
<?php foreach ($this->headers AS $header): ?>
            <th><?php echo $header; ?></th>
<?php endforeach; ?>
<?php if ($this->canUpdate || $this->canDelete): ?>
            <th><?php echo $this->translate('Operations') ?></th>
<?php endif; ?>
        </tr>
    </thead>
    <tbody>
<?php foreach ($this->entries as $entry): ?>
    <tr <?php echo 'class="zs-row-' . $cycle->next() . '"' ?>>
        <?php
        foreach($entry as $field => $value):
            if ($field != 'pkParams'): ?>
        <td><?php echo $value; ?></td>
            <?php endif;
        endforeach; ?>
        <?php if ($this->canUpdate || $this->canDelete): ?>
        <td>
            <?php if ($this->canUpdate):
                      $params = isset($this->actionParams['update']) ? $this->actionParams['update'] : array();
                    ?>
            <a href="<?php echo $this->url(array_merge(array('module' => $this->module, 'controller' => $this->controller, 'action' => 'update'), $entry['pkParams'], $params), 'default', true) ?>" class="zs-btn-edit"><?php echo $this->translate('edit') ?></a>
            <?php endif; ?>
            <?php if ($this->canDelete):
                      $params = isset($this->actionParams['delete']) ? $this->actionParams['delete'] : array();
            ?>
            <a href="<?php echo $this->url(array_merge(array('module' => $this->module, 'controller' => $this->controller, 'action' => 'delete'), $entry['pkParams'], $params), 'default', true) ?>" onclick="return confirm('<?php echo $this->translate('Do you really want to delete the selected %1$s?', $this->entityTitle) ?>');" class="zs-btn-delete"><?php echo $this->translate('delete') ?></a>
            <?php endif; ?>
        </td>
        <?php endif; ?>
    </tr>
<?php endforeach; ?>
    </tbody>
</table>
<?php if (isset($this->paginator)): ?>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'scaffolding/pagination.phtml') ?>
<?php endif; ?>
<?php else: ?>
    <p><strong><?php echo $this->translate('No records have been found') ?></strong></p>
<?php endif; ?>